package com.codechuan.didi_web.exception;

import com.codechuan.didi_web.utils.ResultUtils;
import com.codechuan.didi_web.vo.ResultVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
@Slf4j
public class CustomerExceptionHandler {
    @ExceptionHandler(Exception.class)
    public ResultVO<Object> Execption(Exception e) {
        log.error("未知异常！", e);
        return ResultUtils.error(500,"网络异常,请重新操作","网络异常,请重新操作");
    }
}